FROM openjdk:8-jdk-alpine
#RUN apk -U add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime     && echo "Asia/Shanghai" > /etc/timezone     && apk del tzdata
USER root
ENV TZ Asia/Shanghai
VOLUME /tmp
ENV LANG C.UTF-8
ADD ./*.jar app.jar
RUN sh -c 'touch /app.jar' && mkdir -p /logs && chmod 777 /logs && mkdir -p /nacos && chmod 777 /nacos
RUN   mkdir -p /templates && chmod 777 /templates
ENV JAVA_OPTS=" -DJM.SNAPSHOT.PATH=/nacos "
#暴露端口
EXPOSE 8089
RUN echo "java -Xms1g -Xmx1g -jar \${OPTS} /app.jar " > start.sh && chmod 777 start.sh  
CMD ./start.sh  

